@layout("/common/_curd/_container.html"){

<script type="text/javascript">
	var ctx = "${basePath}";
	var grid_selector = "#grid-table";
	var pager_selector = "#grid-pager";
	
	$(function(){
		initGrid();
		initMenuBtn("btns", "${code}");
	});
	
	function initGrid(){
		var grid_url = ctx + "/${code}/list";
		var _colnames = ["", 
						"用户id", 
						"描述", 
						"积分", 
						"添加时间", 
						"用户名", 
						"操作者", 
						"", 
						"分销商id", 
						"数据类型 0--积分修改 1--余额修改", 
						"", 
						""];
		var _colmodel = [{name:"id", index:"id", width:100},
						{name:"user_id", index:"user_id", width:100},
						{name:"content", index:"content", width:100},
						{name:"integral", index:"integral", width:100},
						{name:"addtime", index:"addtime", width:100},
						{name:"username", index:"username", width:100},
						{name:"operator", index:"operator", width:100},
						{name:"store_id", index:"store_id", width:100},
						{name:"operator_id", index:"operator_id", width:100},
						{name:"type", index:"type", width:100},
						{name:"pic_url", index:"pic_url", width:100},
						{name:"explain", index:"explain", width:100}];
		
		jQuery(grid_selector).jqGrid({
			url : grid_url,
		    shrinkToFit : true,
			colNames : _colnames,
			colModel : _colmodel, 
			jsonReader : {id :"id"},
			pager : pager_selector,
			postData : {sort : "id", order : "desc"}
		});
	}
</script>


	<!-- 配置 grid -->
	<div class="row">
		<div class="col-xs-12 tb-grid">
			<!-- 配置 查询 -->
			@ var _col=[
@		{name:"", index:"id", type:"text"},
			@		{name:"用户id", index:"user_id", type:"text"},
			@		{name:"描述", index:"content", type:"text"},
			@		{name:"积分", index:"integral", type:"text"},
			@		{name:"添加时间", index:"addtime", type:"text"},
			@		{name:"用户名", index:"username", type:"text"},
			@		{name:"操作者", index:"operator", type:"text"},
			@		{name:"", index:"store_id", type:"text"},
			@		{name:"分销商id", index:"operator_id", type:"text"},
			@		{name:"数据类型 0--积分修改 1--余额修改", index:"type", type:"text"},
			@		{name:"", index:"pic_url", type:"text"},
			@		{name:"", index:"explain", type:"text"}							
			@];
			@ include("/common/_function/_search.html",{"col":_col}){}
			<!-- 按钮 -->
			<div class="welljq well-sm" id="btns"></div>
			<!-- grid -->
			<table id="grid-table"></table>
			<!-- 分页-->
			<div id="grid-pager"></div>
		</div>
	</div>
	
	<!-- 引入所需的js -->
	@include("/common/_listscript.html"){}
	
@}	